package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDate;
import java.util.List;

/**
 * 销售订单实体类
 */
@TableName("t_sellorder")
@ApiModel(value = "销售订单实体类", description = "封装销售订单相关属性")
public class SellOrderBean {
    @TableId(value = "pk_sellOrderId", type = IdType.AUTO)
    @ApiModelProperty("销售订单id")
    private Integer sellOrderId;
    @TableField("s_clientName")
    @ApiModelProperty("客户名称")
    private String clientName;
    @TableField("s_sellDate")
    @ApiModelProperty("销售日期")
    private LocalDate sellDate = LocalDate.now();
    @TableField("s_sellAddr")
    @ApiModelProperty("送货地址")
    private String sellAddr;
    @TableField("s_sellTotal")
    @ApiModelProperty("销售总额")
    private Integer sellTotal;
    @TableField("fk_userId")
    @ApiModelProperty("销售员id")
    private Integer userId;
    @TableField(exist = false)
    @ApiModelProperty("销售员")
    private UserBean user;
    @TableField(exist = false)
    @ApiModelProperty("销售员真实姓名")
    private String relName;
    @TableField(exist = false)
    @ApiModelProperty("销售明细集合")
    private List<SellDetailBean> sellDetailList;


    public SellOrderBean() {
    }

    public SellOrderBean(String clientName, String sellAddr, Integer sellTotal, Integer userId) {
        this.clientName = clientName;
        this.sellAddr = sellAddr;
        this.sellTotal = sellTotal;
        this.userId = userId;
    }

    public Integer getSellOrderId() {
        return sellOrderId;
    }

    public void setSellOrderId(Integer sellOrderId) {
        this.sellOrderId = sellOrderId;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public LocalDate getSellDate() {
        return sellDate;
    }

    public void setSellDate(LocalDate sellDate) {
        this.sellDate = sellDate;
    }

    public String getSellAddr() {
        return sellAddr;
    }

    public void setSellAddr(String sellAddr) {
        this.sellAddr = sellAddr;
    }

    public Integer getSellTotal() {
        return sellTotal;
    }

    public void setSellTotal(Integer sellTotal) {
        this.sellTotal = sellTotal;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public List<SellDetailBean> getSellDetailList() {
        return sellDetailList;
    }

    public void setSellDetailList(List<SellDetailBean> sellDetailList) {
        this.sellDetailList = sellDetailList;
    }

    public String getRelName() {
        return relName;
    }

    public void setRelName(String relName) {
        this.relName = relName;
    }

    @Override
    public String toString() {
        return "SellOrderBean{" +
                "sellOrderId=" + sellOrderId +
                ", clientName='" + clientName + '\'' +
                ", sellDate=" + sellDate +
                ", sellAddr='" + sellAddr + '\'' +
                ", sellTotal=" + sellTotal +
                ", userId=" + userId +
                ", user=" + user +
                ", relName='" + relName + '\'' +
                ", sellDetailList=" + sellDetailList +
                '}' + "\n";
    }
}
